<?php
class PostController extends MController {
    public function indexAction(){
        $params = $this->getRequest()->getParams();
        $get = $params['get'];

        if (isset ($get) && !empty ($get)){
            if (isset($get['id'])){
                $post = Post::find($get['id']);
                $this->render('index', array('post'=>$post));
            }
        } else {
            $this->render();
        }
    }
}
?>
